home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
LANG
/
BASIC
/
LIB
/
EVENTSHELL
/
DATALOAD
/
!DataLoad
/
!DataLoad
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1996-01-07
|
5KB
|
111 lines
> <DataLoad$Dir>.!DataLoad
$;" at line "+
debugging%=
Copyright Paul Hobbs 1990,1991,1992,1993,1995
Rheinpfalzstrasse 2
85049 Ingolstadt
Germany
"<EvntShell$Path>ShellLibRT"
shell_FatalError
"Hourglass_On"
"Wimp_SlotSize",-1,-1
progsize%
pagesize%=1<<10
freespace%=&8000+progsize%
=freespace%+pagesize%
=freespace%
shell_HeapManagerInit("<EvntShell$Path>",freespace%)
shell_Init
pass 310 as version nr to allow menu messaging..
5task% =
shell_WimpInit_I( 310, "DataLoad Demo" )
PROCshell_TraceInit( "" )
PROCshell_TraceOn
shell_ResourcesInit
app_init
-------------------- Initialise Variables ----------------------------
$G_closedown% =
Set this to TRUE when you want the program to
%! :
-------------------- Miscelleanous Initialisation --------------------
"Hourglass_Off"
shell_Error
shell_Action(
shell_Poll_I( 0, task% ) )
_closedown%
shell_Exit:
======================================================================
app_init
SetUp_Menus
8_sicon=
shell_Iconbar( -1, "!" +
shell_GetAppName, "" , 120, MenuHandle_IconBar%, 0 ,0 ,0 )
shell_AttachHelpTag( -1, sicon, "iconbar" )
shell_AttachClickSelect( -1, sicon, "_ClickSelect_ibar" )
shell_AttachDataLoad( -1, sicon, &FFF, "_dataloadFFF", -1)
shell_AttachDataLoad( -1, sicon, &200, "_dataload200",
shell_CreateWindowStatic( "mainw", mainw% )
attach dataload event to icon 0 in main window..
shell_AttachDataLoad(mainw%,0,&FEC,"_dataloadFEC",
attach dataload event to icon 10 in main window, this one handles
any file/directory etc dragged to it..
shell_AttachDataLoad(mainw%,10,-1,"_dataload_any",
===== Menu_Setup routines ======================================
SetUp_Menus
void%
NEMenuHandle_IconBar% =
shell_MenuNew( "DataLoad", "Menu_IBar", 2)
O9MenuItem_Info% =
shell_MenuAdd( 0, "Info", "" )
PIMenuItem_Quit% =
shell_MenuAdd( 0, "Quit", "_MenuSelect_Quit" )
shell_AttachMenuDBox( MenuItem_Info%, "progInfo", "_PreOpenInfo", "" )
shell_AttachMenuHelpTag( "Menu_IBar", MenuItem_Quit%, "menutest2" )
shell_AttachMenuHelpTag( "Menu_IBar", MenuItem_Info%, "menutest" )
===== Dialog_PreOpen routines ==================================
_PreOpenInfo(wh%)
shell_IconPutData(wh%,0,
shell_MessageNoArgs("progInfo0"),0)
shell_IconPutData(wh%,1,
shell_MessageNoArgs("progInfo1"),0)
shell_IconPutData(wh%,2,
shell_MessageNoArgs("progInfo2"),0)
shell_IconPutData(wh%,3,
shell_MessageNoArgs("progInfo3"),0)
===== Dialog_PostOpen routines =================================
===== Click_Select routines ====================================
_ClickSelect_ibar(wh%,ih%)
shell_OpenWindowStatic(mainw%)
===== Click_Adjust routines ====================================
===== Menu_Select routines =====================================
_MenuSelect_Quit(blk%)
_closedown%=
===== Data_Load routines =======================================
_dataload200(loc%,type%,name$,size%)
void%
pick up location of loaded file....
zjvoid%=
shell_MessageWindow("File loaded at &"+
~loc%+" Type=&"+
~type%+" '"+name$+"'",0,"DataLoad","")
_dataloadFFF(loc%,type%,name$,size%)
void%
pick up location of loaded file....
Qvoid%=
shell_MessageWindow("File '"+name$+"' Type=&"+
~type%,0,"DataLoad","")
_dataloadFEC(loc%,type%,name$,size%)
just display a message - user app must actually load file here..
Qvoid%=
shell_MessageWindow("File '"+name$+"' Type=&"+
~type%,0,"DataLoad","")
_dataload_any( loc%, type%, name$, size% )
just put the filename in the icon...
shell_IconPutData( mainw%, 10, name$,
shell_IconPutData( mainw%, 13, "&" +
~type%,
===== Data_Save routines =======================================
===== Application routines =====================================
===== End of user application ==================================
=================== Routines to go in the library ==================